/**
 * Created by yangfan on 2016/10/14.
 */
define(['config/appregister',"i18n"],function(app,i18n){
   app.filter("dateFilter",function(){
       return function(input){
           if(!input){
               return
           }
           if(typeof input =="string"&& input!="" && input.indexOf(" ")!=-1){
               var index = input.indexOf(" ");
               var retDate = input.substr(0,index);
               return retDate
           }
       }
   });

    //todo
    app.filter("getFileType",function(){
        return function(input){
            if(!input){
                return
            }
            switch (type){
                case "doc":
                    fileTypeId = 1;
                    break;
                case "pdf":
                    fileTypeId = 2;
                    break;
                case "ppt":
                    fileTypeId = 3;
                    break;
                case "dwg":
                    fileTypeId = 4;
                    break;
                case "xls":
                    fileTypeId = 5;
                    break;
                case "jpg":
                    fileTypeId = 6;
                    break;
            }
            if(input == "doc"||input == "docx"){
                return
            }

        }
    })
});
